<?php

class FJSONResponse
{
    
    private $success;
    private $data;
    private $total;
    private $empty;
    private $msg;
    private $id;
    
    private $action;
    private $closeForm;
    private $confirmOnClose;
    private $onCloseConfirmMsg;
    private $showSuccessMsg;
    
    public function response()
    {
        $response = array(
            "success" => $this->success,
            "data" => $this->data,
            "total" => $this->total,
            "empty" => $this->empty,
            "msg" => $this->msg,
            "id" => $this->id,
            "closeForm" => $this->closeForm,
            "confirmOnClose" => $this->confirmOnClose,
            "onCloseConfirmMsg" => $this->onCloseConfirmMsg,
            "showSuccessMsg" => $this->showSuccessMsg,
            "action" => $this->getAction()
        );
        
        echo json_encode($response);
    }
    
    public function getSuccess() {
        return $this->success;
    }

    public function setSuccess($success) {
        $this->success = $success;
    }

    public function getData() {
        return $this->data;
    }

    public function setData($data) {
        $this->data = $data;
    }

    public function getTotal() {
        return $this->total;
    }

    public function setTotal($total) {
        $this->total = $total;
    }

    public function getEmpty() {
        return $this->empty;
    }

    public function setEmpty($empty) {
        $this->empty = $empty;
    }

    public function getMsg() {
        return $this->msg;
    }

    public function setMsg($msg) {
        $this->msg = $msg;
    }
    
    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
    }
    
    public function getAction() {
        return $this->action;
    }

    public function setAction($action) {
        $this->action = $action;
    }
        
    public function getCloseForm() {
        return $this->closeForm;
    }

    public function setCloseForm($closeForm) {
        $this->closeForm = $closeForm;
    }

    public function getConfirmOnClose() {
        return $this->confirmOnClose;
    }

    public function setConfirmOnClose($confirmOnClose) {
        $this->confirmOnClose = $confirmOnClose;
    }

    public function getOnCloseConfirmMsg() {
        return $this->onCloseConfirmMsg;
    }

    public function setOnCloseConfirmMsg($onCloseConfirmMsg) {
        $this->onCloseConfirmMsg = $onCloseConfirmMsg;
    }
    
    public function getShowSuccessMsg() {
        return $this->showSuccessMsg;
    }

    public function setShowSuccessMsg($showSuccessMsg) {
        $this->showSuccessMsg = $showSuccessMsg;
    }
}

?>
